import axios from 'axios'
import store from '@/store'
const service = axios.create({
  baseURL: import.meta.env.VITE_API_BASE_URL,
  timeout: 5000
})
service.interceptors.request.use(config => {
  if(store.getters.token) {
    config.headers.Authorization = `Bearer ${store.getters.token}`
  }
  return config
})
export default service